import com.alibaba.fastjson.JSONObject;

import java.sql.Timestamp;
import java.util.Date;

public class test {
    public static void main(String[] args) {
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        System.out.println(timestamp);
        System.out.println(JSONObject.toJSONString(timestamp));
        Date date = new Date();
        System.out.println(JSONObject.toJSONString(date));
    }
}
